#1000以内的水仙花数
for num in range(100, 1000):
    b = num // 100
    s = (num // 10) % 10
    g = num % 10
    if num == b ** 3 + s ** 3 + g ** 3:
        print(num)